package org.minproject.my_library_back.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 
 * @TableName book
 */
@TableName(value ="book")
@Data
public class Book implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer bookId;

    /**
     * 
     */
    private String bookName;

    /**
     * 
     */
    private String bookAuthor;

    /**
     * 
     */
    private String bookIntroduction;

    /**
     * 
     */
    private String bookPicture;

    /**
     * 
     */
    private Integer bookNum;

    /**
     * 
     */
    private BigDecimal bookPrice;

    /**
     * 
     */
    private BigDecimal bookScore;

    /**
     * 
     */
    private String bookSort;

    /**
     * 
     */
    private String bookCode;

    /**
     * 
     */
    private String bookLocation;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Book other = (Book) that;
        return (this.getBookId() == null ? other.getBookId() == null : this.getBookId().equals(other.getBookId()))
            && (this.getBookName() == null ? other.getBookName() == null : this.getBookName().equals(other.getBookName()))
            && (this.getBookAuthor() == null ? other.getBookAuthor() == null : this.getBookAuthor().equals(other.getBookAuthor()))
            && (this.getBookIntroduction() == null ? other.getBookIntroduction() == null : this.getBookIntroduction().equals(other.getBookIntroduction()))
            && (this.getBookPicture() == null ? other.getBookPicture() == null : this.getBookPicture().equals(other.getBookPicture()))
            && (this.getBookNum() == null ? other.getBookNum() == null : this.getBookNum().equals(other.getBookNum()))
            && (this.getBookPrice() == null ? other.getBookPrice() == null : this.getBookPrice().equals(other.getBookPrice()))
            && (this.getBookScore() == null ? other.getBookScore() == null : this.getBookScore().equals(other.getBookScore()))
            && (this.getBookSort() == null ? other.getBookSort() == null : this.getBookSort().equals(other.getBookSort()))
            && (this.getBookCode() == null ? other.getBookCode() == null : this.getBookCode().equals(other.getBookCode()))
            && (this.getBookLocation() == null ? other.getBookLocation() == null : this.getBookLocation().equals(other.getBookLocation()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBookId() == null) ? 0 : getBookId().hashCode());
        result = prime * result + ((getBookName() == null) ? 0 : getBookName().hashCode());
        result = prime * result + ((getBookAuthor() == null) ? 0 : getBookAuthor().hashCode());
        result = prime * result + ((getBookIntroduction() == null) ? 0 : getBookIntroduction().hashCode());
        result = prime * result + ((getBookPicture() == null) ? 0 : getBookPicture().hashCode());
        result = prime * result + ((getBookNum() == null) ? 0 : getBookNum().hashCode());
        result = prime * result + ((getBookPrice() == null) ? 0 : getBookPrice().hashCode());
        result = prime * result + ((getBookScore() == null) ? 0 : getBookScore().hashCode());
        result = prime * result + ((getBookSort() == null) ? 0 : getBookSort().hashCode());
        result = prime * result + ((getBookCode() == null) ? 0 : getBookCode().hashCode());
        result = prime * result + ((getBookLocation() == null) ? 0 : getBookLocation().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", bookId=").append(bookId);
        sb.append(", bookName=").append(bookName);
        sb.append(", bookAuthor=").append(bookAuthor);
        sb.append(", bookIntroduction=").append(bookIntroduction);
        sb.append(", bookPicture=").append(bookPicture);
        sb.append(", bookNum=").append(bookNum);
        sb.append(", bookPrice=").append(bookPrice);
        sb.append(", bookScore=").append(bookScore);
        sb.append(", bookSort=").append(bookSort);
        sb.append(", bookCode=").append(bookCode);
        sb.append(", bookLocation=").append(bookLocation);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}